package com.heima.admin;

import org.apache.commons.lang.RandomStringUtils;
import org.junit.jupiter.api.Test;
import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;

public class Md5 {
    @Test
    public void Md5demo(){
        String salt ="difjif34" ;
        String s = DigestUtils.md5DigestAsHex(("123" + salt).getBytes(StandardCharsets.UTF_8));
        if ("176478a9fad79b4b6003d397dcf062b0".equals(s)){
            System.out.println("登录成功");
        }
    }}
